home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIProfileMigrator.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  109 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is The Browser Profile Migrator.
  16.  *
  17.  * The Initial Developer of the Original Code is Ben Goodger.
  18.  * Portions created by the Initial Developer are Copyright (C) 2004
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *   Ben Goodger <ben@bengoodger.com>
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39. interface nsIFile;
  40.  
  41. /**
  42.  * Helper interface for nsIProfileMigrator.
  43.  *
  44.  * @provider Toolkit (Startup code)
  45.  * @client   Application (Profile-migration code)
  46.  * @obtainable nsIProfileMigrator.migrate
  47.  */
  48. [scriptable, uuid(048e5ca1-0eb7-4bb1-a9a2-a36f7d4e0e3c)]
  49. interface nsIProfileStartup : nsISupports
  50. {
  51.   /**
  52.    * The root directory of the semi-current profile, during profile migration.
  53.    * After nsIProfileMigrator.migrate has returned, this object will not be
  54.    * useful.
  55.    */
  56.   readonly attribute nsIFile directory;
  57.  
  58.   /**
  59.    * Do profile-startup by setting NS_APP_USER_PROFILE_50_DIR in the directory
  60.    * service and notifying the profile-startup observer topics.
  61.    */
  62.   void doStartup();
  63. };
  64.  
  65. /**
  66.  * Migrate application settings from an outside source.
  67.  *
  68.  * @provider Application (Profile-migration code)
  69.  * @client   Toolkit (Startup code)
  70.  * @obtainable service, contractid("@mozilla.org/toolkit/profile-migrator;1")
  71.  */
  72. [scriptable, uuid(24ce8b9d-b7ff-4279-aef4-26e158f03e34)]
  73. interface nsIProfileMigrator : nsISupports 
  74. {
  75.   /**
  76.    * Import existing profile paths.  When the app is started the first
  77.    * time, if there are no INI-style profiles, appstartup will call
  78.    * this method to import any registry- style profiles that may
  79.    * exist. When this method is called, there is no event queue
  80.    * service and this method should not attempt to use the network or
  81.    * show any GUI.
  82.    *
  83.    * @note You don't actually have to move the profile data. Just call
  84.    *       nsIToolkitProfileService.create on the existing profile path(s).
  85.    */
  86.   void import();
  87.  
  88.   /**
  89.    * Do profile migration.
  90.    *
  91.    * When this method is called, a default profile has been created;
  92.    * XPCOM has been initialized such that compreg.dat is in the
  93.    * profile; the directory service does *not* return a key for
  94.    * NS_APP_USER_PROFILE_50_DIR or any of the keys depending on an active
  95.    * profile. To figure out the directory of the "current" profile, use
  96.    * aStartup.directory.
  97.    *
  98.    * If your migrator needs to access services that use the profile (to
  99.    * set profile prefs or bookmarks, for example), use aStartup.doStartup.
  100.    *
  101.    * The startup code ignores COM exceptions thrown from this method.
  102.    */
  103.   void migrate(in nsIProfileStartup aStartup);
  104. };  
  105.  
  106. %{C++
  107. #define NS_PROFILEMIGRATOR_CONTRACTID "@mozilla.org/toolkit/profile-migrator;1"
  108. %}
  109.